﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Mammoth.Entities;

namespace Mammoth.Converters
{
    class EventTypeToImageSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var type = (EventItemType)value;
            switch (type)
            {
                case EventItemType.Error:
                    return "../Images/warning.png";
                case EventItemType.Inbox:
                    return "../Images/inbox.png";
                case EventItemType.Outbox:
                    return "../Images/outbox.png";
                case EventItemType.Subscription:
                    return "../Images/card.png";
                default:
                    return "../Images/warning.png";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
